{/* LAYOUT模板 */}
<layout name="layout"/>
{/* LAYOUT模板 */}
{/* import Js,Css */}	
<css href="__THEMES__/css/common.css" />
<css href="__PUBLIC__/css/jquery-ui.css" />
<js href="__PUBLIC__/js/core/jquery-ui.1.10.4.js" />
<js href="__PUBLIC__/js/core/plugins.js" />
<js href="__PUBLIC__/js/region.js" />
<js href="__PLUGS__/layer-v1.8.5/layer/layer.min.js" />
{/* import js,css */}


<style>
/*购买步骤*/
.store_cart{width: 960px;padding: 0 20px;margin: 0 auto;overflow: hidden;}.cart_progress_bar{width: 584px;margin: 59px auto;height: 34px;overflow: hidden;background: url(__THEMES__/images/store_bg.png) no-repeat 0 -280px;}
.cart_progress_bar li{width: 190px;height: 33px;line-height: 33px;float: left;display: inline-block;font-size: 14px;color: #999999;padding-left: 30px;}.cart_progress_bar li.current{color: #FFFFFF;}
/*提交订单成功*/
.maindom{}.qs-icons{background:url(__THEMES__/images/) no-repeat 0px 0px;}.qs-success-wrap{width:100%;height:70px;}.qs-success-wrap span{display:inline-block;float:left;}.qs-success-wrap .qs-icon-success{height:70px;width:70px;background:url(__THEMES__/images/icon-success.png) no-repeat 0px 0px; margin-left:300px;}.qs-success-wrap .qs-success-text{line-height:70px;font-size:18px; text-indent:20px;}.qs-order-info{text-align:center;font-size:16px;}.qs-payment-list-wrap{width: 1200;margin: 30px auto;border: 1px solid #e7e7e7;}.sel-pay-title{dispaly:block;height:50px;text-indent:20px;margin:0px;padding:0px;background:#fafafa;border-bottom:1px solid #e7e7e7;font-size:18px;line-height:50px;color:#e8380d;}
.qs-pay-list{padding:10px 20px;}.qs-pay-list span{display:block;float:left;margin-left:20px; padding:3px; height:70px; width:130px;cursor:pointer;}.qs-pay-list .selected{background:url(__IMG__/pay-selected.png) no-repeat 0px 0px;}.qs-pay-list p{display:block;font-size:14px;text-indent:30px;height:30px;line-height:30px;}.submit-btn{display: inline-block;text-align:center;font-size:18px;width: 156px;height: 40px;text-align: center;line-height: 40px;margin-right: 77px;margin-left: 15px;color: #fff;background-color: #e8380d;border-radius: 4px;text-decoration: none;margin-top: 25px;}

#dialog .d-title{display:block;height:40px;font-size:20px;line-height:35px;text-indent:20px;border-bottom:2px solid #009DE4;color:#009DE4;}
#dialog .qs-close-button-1{display:none;color:#404040; position:absolute;top:-3px;right:-47px;width:45px;line-height:43px;text-align:center;height:45px;font-size:30px;background-color:#e0e0e0;cursor:pointer;}
#dialog .check-mail-wrap{display:block;relative;}
#dialog .check-mail-wrap ul{margin-left:30px;}
#dialog .check-mail-wrap li{display:block; float:left;}
.qs-send-btn{font-size:16px;outline:none;height:33px;width:100px;border:1px solid #FF3D00;background-color:#fff;color:#FF3D00;cursor:pointer;border-radius:3px;margin-left:20px;vertical-align:center;text-align:center;}
#dialog .surebtn {
	display:inline-block;
	width:90px;
	height:30px;
	color: #FFF;
	cursor: pointer;
	border: 0;
	background: #00b6f3;
	line-height:30px;
	text-align:center;
	color: #fff;
	box-shadow: 0 2px 2px rgba(0,0,0,0.18),0 0 6px rgba(255,255,190,0.44) inset;
	border: 1px #007aa3 solid;
}
#dialog .returnbtn{
	display:inline-block;
	width:90px;
	height:30px;
	color: #FFF;
	cursor: pointer;
	border: 0;
	background: #00b6f3;
	line-height:30px;
	text-align:center;
	color: #fff;
	box-shadow: 0 2px 2px rgba(0,0,0,0.18),0 0 6px rgba(255,255,190,0.44) inset;
	border: 1px #007aa3 solid;
	margin-left:50px;
}
#dialog .btn{width:90%;margin:auto;margin-top:30px;}
#dialog .tips{font-size:12px;color:#404040;display:block;width:90%;margin:auto;line-height:25px;}
</style>

<div id="dialog" style="display:none;">
	<p class="tips">
		当您在第三方平台完成支付后，请点击“已完成支付”按钮，以最终确认订单的支付状态。若支付过程出现失败，点击支付失败重新支付。
	</p>
	<div class="btn">
		<div id="success-btn" class="surebtn">支付成功</div>
		<div id="error-btn" class="returnbtn">支付失败</div>
	</div>
	<form id="payment-form" method="post" action="{:U('flow/pay_success')}">
		<input type="hidden" name="order_id" value="{$order_info.order_id}"/>
	</form>
</div>



<form id="payorder-form" action="__URL__/set_pay_method">
	<div class="maindom w_1200 mauto">
		<div class="step_buy_wrap">
			<div class="store_cart">
				<ul class="cart_progress_bar">
					<li class="current">
						1&nbsp;&nbsp;我的购物车
					</li>
					<li class="current">
						2&nbsp;&nbsp;填写核对订单信息
					</li>
					<li class="current">
						3&nbsp;&nbsp;成功提交订单
					</li>
					<div class="store_clear"></div>
				</ul>
			</div>
		</div>
		<div class="qs-success-wrap" style="height:70px;">
			<div class="qs-order-info">
				订单号:&nbsp;&nbsp;
				<b class="order_sn" style="color:red;font-size:14px;">{$order_info['order_sn']}</b>&nbsp;&nbsp;-&nbsp;&nbsp;{$order_info['consignee']}&nbsp;&nbsp;
				{$order_info.country_name}-{$order_info.province_name}省-{$order_info.city_name}市-{$order_info.district_name}(县/区)&nbsp;&nbsp;{$order_info['address']}
			</div>
			<span class="qs-icon-success "></span>
			<span class="qs-success-text">订单提交成功,要支付订单了哦~~^_^</span>
		</div>	
		<!--支付方式-->
		<div class="qs-payment-list-wrap">
			<h1 class="sel-pay-title">选择支付方式</h1>
			<div class="qs-payment-list clearfix">
				<table width="100%">
					<tr height="100px">
						<td width="150px" style="font-size:18px;" align="center">
							支付平台
						</td>
						<td style="border-left:1px solid #e7e7e7;">
							<div class="qs-pay-list">
								<volist name="payment_list" id="payment">
									<span <if condition="$payment['pay_id'] eq $order_info['pay_id']">class="selected"</if> pay-type="{$payment.pay_code}" pay-id="{$payment.pay_id}">
										<img src="__IMG__/{$payment.pay_code}.gif" width="110px"/>						
										<p>
											{$payment.pay_name}
										</p>
									</span>
								</volist>
							</div>
						</td>
					</tr>
				</table>
			</div>
			<div style="clear:both;">
				<input type="hidden" name="order_id" id="order_id" value="{$order_info.order_id}"/>
				<span id="submit-btn" class="submit-btn fr" style="cursor:pointer;">我要支付</span>
			</div>
		</div>
		<!--支付方式-->
	</div>
</form>




<div class="space200" style="height:200px;"></div>


<script>
	$(document).ready(function(){
		$('.qs-pay-list').find('span').each(function(){
			$(this).click(function(){
				$('.qs-pay-list').find('span').each(function(){
					$(this).removeClass('selected');
				});
				$(this).addClass('selected');
			});
		});		
		$('#submit-btn').click(function(){
			var type 	= 	$('span.selected').attr('pay-type');
			var pay_id 	= 	$('span.selected').attr('pay-id');
			var order_id = 	$('#order_id').val();
			if(type == '' || typeof type == 'undefined') { alert('请选择支付方式'); return; };
			$('#dialog').Qdialog({
				width:400,
				height:200,
				modal:true
			});
			window.open("{:U('flow/gotopay')}"+ "?order_id=" + order_id + "&pay_id=" + pay_id + "&type=" + type);
		});
		/*点击支付成功*/
		$('#success-btn').click(function(){
			//var pay_id 	= 	$('span.selected').attr('pay-id');
			$('#payment-form').submit();
		});
	});
</script>








<include file="Library:service"/>
<include file="Library:footer"/>













